package edu.hunau.cxb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author hb
 * @create 2020-03-24 11:34
 */
@Controller
public class HelloWorldController {
    @RequestMapping("/hello")
    public ModelAndView execute(){
        ModelAndView mv = new ModelAndView();
        //设置了视图的资源名称
        //hello称为逻辑视图名
        //根据视图解析器的前缀+逻辑视图名+后缀,获得视图资源的物理路径
        mv.setViewName("hello");
        return mv;
   }
}
